<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  
</body>
<script>

  const p = new Promise((resolve,reject)=>{
    try{
      throw new Error(`网络异常`)
      console.log(`请求A数据`);
      setTimeout(()=>{

        console.log(`请求A数成功`);
        resolve(`ok`)
        // resolve(e)
      })
    }catch(e){
      // console.log(e);
      // console.log(e.message);
      reject(e.message)
    }
  })

console.log(`p`,p);
</script>
</html>